

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>MdWeaver - LiterateCS</title>

	<link rel="icon" type="image/x-icon" href="../images/favicon.ico">
    <link rel="stylesheet" href="../bootstrap/css/readable/bootstrap.min.css" />
<link rel="stylesheet" href="../font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="../sidebar/sidebar.min.css" />
<link rel="stylesheet" href="../css/book.min.css" />
<link rel="stylesheet" href="../syntax-highlight/solarized-light.min.css" />
<link rel="stylesheet" href="../mermaid/mermaid.css" />

</head>

<body>
    
    <nav class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#sidebar-toggle" id="sidebar-toggle">
					<span>
						<img src="../images/favicon.ico" height="24" class="hidden-sm hidden-xs" />
						<i id="sidebar-toggle-icon" class="hidden-md hidden-lg hidden-xl fa fa-angle-double-right" aria-hidden="true"></i>
						LiterateCS
					</span>
				</a>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li><a href="../index.html"><i class="fa fa-home" aria-hidden="true"></i> Home</a></li>
					<li><a href="https://github.com/johtela/LiterateCS"><i class="fa fa-github" aria-hidden="true"></i> GitHub Repository</a></li>
                    <li><a href="https://www.nuget.org/packages/LiterateCS/"><i class="fa fa-download" aria-hidden="true"></i> Download</a></li>
                    <li><a href="../License.html">License</a></li>
                </ul>
            </div>
        </div>
    </nav>

    <div class="container">
        <div class="row">
            <div id="sidebar" class="col-md-3 hidden-sm hidden-xs">
                
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4>On This Page</h4>
            </div>
            <div id="header-menu" class="panel-body main-menu">
                <ul></ul>
            </div>
        </div>  
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4>Table of Contents</h4>
            </div>
            <div class="panel-body main-menu">
                <ul>
	<li><a href="../index.html">Home</a></li>
	<ul>
	</ul>
	<li><a href="../Introduction.html">Introduction</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/Options.html">Command Line Options</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/Program.html">Main Program</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/SplitPath.html">SplitPath Structure</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/Weaver.html">Document Weaver</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/MdWeaver.html" class="selected">Markdown Weaver</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/HtmlWeaver.html">HTML Weaver</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/TocManager.html">TOC Manager</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/BlockList.html">Source Blocks</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/Macro.html">Macros</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/BlockBuilder.html">Block Builder</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/HtmlBlockBuilder.html">HTML Block Builder</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/HtmlGenerator.html">HTML Generation</a></li>
	<ul>
	</ul>
	<li>Themes</li>
	<ul>
<ul>
	<li><a href="../LiterateCS.Theme/DirHelpers.html">Directory Utilities</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS.Theme/Toc.html">Table of Contents Classes</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS.Theme/PageParams.html">Page Parameters</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS.Theme/Theme.html">Theme Base Class</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS.Theme/LiterateException.html">Reporting Errors</a></li>
	<ul>
	</ul>
</ul>
	</ul>
	<li><a href="../FrontMatter.html">Front Matter</a></li>
	<ul>
	</ul>
	<li><a href="../TableOfContents.html">Table of Contents File</a></li>
	<ul>
	</ul>
	<li><a href="../TipsAndTricks.html">Tips &amp; Tricks</a></li>
	<ul>
	</ul>
	<li><a href="../License.html">License</a></li>
	<ul>
	</ul>
	<li><a href="../README.html">README</a></li>
	<ul>
	</ul>
	<li><a href="../Installation.html">Installation</a></li>
	<ul>
	</ul>
</ul>
            </div>
        </div>

            </div>
			<div id="contentarea" class="col-md-9 col-sm-12 col-sm-push-0 col-xs-12 col-xs-push-0">
				<ul class="pager">
	<li class="previous"><a href="../LiterateCS/Weaver.html">Previous: Document Weaver</a></li>
	<li class="next"><a href="../LiterateCS/HtmlWeaver.html">Next: HTML Weaver</a></li>
</ul>
				<div id="static-content" class="markdown">
					<h1 id="markdown-weaver">Markdown Weaver</h1>
<p>Now we can look at how markdown output is generated. This is the easier of the
two use cases. We only need to split source files into comments and code and
<em>weave</em> the generated blocks to the output files. The splitting part is done
in the <a href="BlockBuilder.html">BlockBuilder</a> class. The markdown weaver takes the
generated block lists and writes them verbatim to the output files.</p>
<pre class="csharp"><code class="csharp"><span class="keyword" id="LiterateCS">namespace</span> LiterateCS
<span class="punctuation">{</span>
	<span class="keyword">using</span> Microsoft<span class="punctuation">.</span>CodeAnalysis<span class="punctuation">;</span>
	<span class="keyword">using</span> System<span class="punctuation">.</span>IO<span class="punctuation">;</span>

	<span class="keyword" id="LiterateCS.MdWeaver">public</span> <span class="keyword">class</span> <span class="typename">MdWeaver</span> <span class="punctuation">:</span> <span class="typename" data-toggle="tooltip" title="LiterateCS.Weaver"><a href="../LiterateCS/Weaver.html#LiterateCS.Weaver">Weaver</a></span>
	<span class="punctuation">{</span>
		<span class="keyword" id="LiterateCS.MdWeaver.MdWeaver(LiterateCS.Options)" data-toggle="tooltip" title="LiterateCS.MdWeaver.MdWeaver(LiterateCS.Options)">public</span> <span data-toggle="tooltip" title="LiterateCS.MdWeaver.MdWeaver(LiterateCS.Options)">MdWeaver</span> <span class="punctuation">(</span><span class="typename" data-toggle="tooltip" title="LiterateCS.Options"><a href="../LiterateCS/Options.html#LiterateCS.Options">Options</a></span> options<span class="punctuation">)</span>
			<span class="punctuation" data-toggle="tooltip" title="void">:</span> <span class="keyword" data-toggle="tooltip" title="void">base</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="LiterateCS.Options">options</span><span class="punctuation">)</span>
		<span class="punctuation">{</span> <span class="punctuation">}</span>
</code></pre>
<h2 id="generating-output">Generating Output</h2>
<p>The first method to be implemented is to generate documentation	from
an input directory. We use the inherited function to enumerate input
files of a specific type. We transform the files by calling the
appropriate <code>Weave*</code> function.</p>
<pre class="csharp"><code class="csharp">		<span class="keyword" id="LiterateCS.MdWeaver.GenerateFromFiles()" data-toggle="tooltip" title="LiterateCS.MdWeaver.GenerateFromFiles()">protected</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.MdWeaver.GenerateFromFiles()">override</span> <span class="keyword" data-toggle="tooltip" title="void">void</span> <span data-toggle="tooltip" title="LiterateCS.MdWeaver.GenerateFromFiles()">GenerateFromFiles</span> <span class="punctuation">(</span><span class="punctuation">)</span>
		<span class="punctuation">{</span>
			<span class="keyword">foreach</span> <span class="punctuation">(</span><span class="keyword" data-toggle="tooltip" title="LiterateCS.SplitPath">var</span> file <span class="keyword">in</span> <span data-toggle="tooltip" title="LiterateCS.Weaver.SourceFiles()"><a href="../LiterateCS/Weaver.html#LiterateCS.Weaver.SourceFiles()">SourceFiles</a></span> <span class="punctuation">(</span><span class="punctuation">)</span><span class="punctuation">)</span>
				<span data-toggle="tooltip" title="LiterateCS.MdWeaver.WeaveFromCode(LiterateCS.SplitPath)"><a href="../LiterateCS/MdWeaver.html#LiterateCS.MdWeaver.WeaveFromCode(LiterateCS.SplitPath)">WeaveFromCode</a></span> <span class="punctuation">(</span><span data-toggle="tooltip" title="LiterateCS.SplitPath">file</span><span class="punctuation">)</span><span class="punctuation">;</span>
			<span class="keyword">foreach</span> <span class="punctuation">(</span><span class="keyword" data-toggle="tooltip" title="LiterateCS.SplitPath">var</span> file <span class="keyword">in</span> <span data-toggle="tooltip" title="LiterateCS.Weaver.MarkdownFiles()"><a href="../LiterateCS/Weaver.html#LiterateCS.Weaver.MarkdownFiles()">MarkdownFiles</a></span> <span class="punctuation">(</span><span class="punctuation">)</span><span class="punctuation">)</span>
				<span data-toggle="tooltip" title="LiterateCS.MdWeaver.WeaveFromMarkdown(LiterateCS.SplitPath)"><a href="../LiterateCS/MdWeaver.html#LiterateCS.MdWeaver.WeaveFromMarkdown(LiterateCS.SplitPath)">WeaveFromMarkdown</a></span> <span class="punctuation">(</span><span data-toggle="tooltip" title="LiterateCS.SplitPath">file</span><span class="punctuation">)</span><span class="punctuation">;</span>
		<span class="punctuation">}</span>
</code></pre>
<p>The second options is to use a solution as an input. Again we iterate
markdown and C# source files separately and call the correct method to
transform them to output.</p>
<pre class="csharp"><code class="csharp">		<span class="keyword" id="LiterateCS.MdWeaver.GenerateFromSolution()" data-toggle="tooltip" title="LiterateCS.MdWeaver.GenerateFromSolution()">protected</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.MdWeaver.GenerateFromSolution()">override</span> <span class="keyword" data-toggle="tooltip" title="void">void</span> <span data-toggle="tooltip" title="LiterateCS.MdWeaver.GenerateFromSolution()">GenerateFromSolution</span> <span class="punctuation">(</span><span class="punctuation">)</span>
		<span class="punctuation">{</span> 
			<span class="keyword">foreach</span> <span class="punctuation">(</span><span class="keyword" data-toggle="tooltip" title="System.Tuple<LiterateCS.SplitPath, Microsoft.CodeAnalysis.Document>">var</span> doc <span class="keyword">in</span> <span data-toggle="tooltip" title="LiterateCS.Weaver.CSharpDocumentsInSolution()"><a href="../LiterateCS/Weaver.html#LiterateCS.Weaver.CSharpDocumentsInSolution()">CSharpDocumentsInSolution</a></span> <span class="punctuation">(</span><span class="punctuation">)</span><span class="punctuation">)</span>
				<span data-toggle="tooltip" title="LiterateCS.MdWeaver.WeaveFromCSharpDocument(LiterateCS.SplitPath, Microsoft.CodeAnalysis.Document)"><a href="../LiterateCS/MdWeaver.html#LiterateCS.MdWeaver.WeaveFromCSharpDocument(LiterateCS.SplitPath, Microsoft.CodeAnalysis.Document)">WeaveFromCSharpDocument</a></span> <span class="punctuation">(</span><span data-toggle="tooltip" title="System.Tuple<LiterateCS.SplitPath, Microsoft.CodeAnalysis.Document>">doc</span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.SplitPath">.</span><span data-toggle="tooltip" title="LiterateCS.SplitPath">Item1</span><span class="punctuation">,</span> <span data-toggle="tooltip" title="System.Tuple<LiterateCS.SplitPath, Microsoft.CodeAnalysis.Document>">doc</span><span class="punctuation" data-toggle="tooltip" title="Microsoft.CodeAnalysis.Document">.</span><span data-toggle="tooltip" title="Microsoft.CodeAnalysis.Document">Item2</span><span class="punctuation">)</span><span class="punctuation">;</span>
			<span class="keyword">foreach</span> <span class="punctuation">(</span><span class="keyword" data-toggle="tooltip" title="LiterateCS.SplitPath">var</span> inputFile <span class="keyword">in</span> <span data-toggle="tooltip" title="LiterateCS.Weaver.MarkdownFiles()"><a href="../LiterateCS/Weaver.html#LiterateCS.Weaver.MarkdownFiles()">MarkdownFiles</a></span> <span class="punctuation">(</span><span class="punctuation">)</span><span class="punctuation">)</span>
				<span data-toggle="tooltip" title="LiterateCS.MdWeaver.WeaveFromMarkdown(LiterateCS.SplitPath)"><a href="../LiterateCS/MdWeaver.html#LiterateCS.MdWeaver.WeaveFromMarkdown(LiterateCS.SplitPath)">WeaveFromMarkdown</a></span> <span class="punctuation">(</span><span data-toggle="tooltip" title="LiterateCS.SplitPath">inputFile</span><span class="punctuation">)</span><span class="punctuation">;</span>
		<span class="punctuation">}</span>
</code></pre>
<h3 id="weaving-the-output">Weaving the Output</h3>
<p>The rest of the code in this class consist of helper functions which
split the input files to blocks and compile the output from them.
Since the blocks already contain valid markdown, no further processing
is needed to transform them.</p>
<pre class="csharp"><code class="csharp">		<span class="keyword" id="LiterateCS.MdWeaver.WeaveFromMarkdown(LiterateCS.SplitPath)" data-toggle="tooltip" title="LiterateCS.MdWeaver.WeaveFromMarkdown(LiterateCS.SplitPath)">private</span> <span class="keyword" data-toggle="tooltip" title="void">void</span> <span data-toggle="tooltip" title="LiterateCS.MdWeaver.WeaveFromMarkdown(LiterateCS.SplitPath)">WeaveFromMarkdown</span> <span class="punctuation">(</span><span class="typename" data-toggle="tooltip" title="LiterateCS.SplitPath"><a href="../LiterateCS/SplitPath.html#LiterateCS.SplitPath">SplitPath</a></span> mdFile<span class="punctuation">)</span>
		<span class="punctuation">{</span>
			<span class="typename" data-toggle="tooltip" title="LiterateCS.SplitPath"><a href="../LiterateCS/SplitPath.html#LiterateCS.SplitPath">SplitPath</a></span> <span id="outputFile">outputFile</span> <span class="punctuation">=</span> <span data-toggle="tooltip" title="LiterateCS.Weaver.CreateOutputPath(LiterateCS.SplitPath, string)"><a href="../LiterateCS/Weaver.html#LiterateCS.Weaver.CreateOutputPath(LiterateCS.SplitPath, string)">CreateOutputPath</a></span> <span class="punctuation">(</span><span data-toggle="tooltip" title="LiterateCS.SplitPath">mdFile</span><span class="punctuation">,</span> <span data-toggle="tooltip" title="LiterateCS.Options"><a href="../LiterateCS/Weaver.html#LiterateCS.Weaver._options">_options</a></span><span class="punctuation" data-toggle="tooltip" title="string">.</span><span data-toggle="tooltip" title="string"><a href="../LiterateCS/Options.html#LiterateCS.Options.MarkdownExt">MarkdownExt</a></span><span class="punctuation">)</span><span class="punctuation">;</span>
			<span data-toggle="tooltip" title="LiterateCS.MdWeaver.OutputBlocks(LiterateCS.BlockList, string)"><a href="../LiterateCS/MdWeaver.html#LiterateCS.MdWeaver.OutputBlocks(LiterateCS.BlockList, string)">OutputBlocks</a></span> <span class="punctuation">(</span><span data-toggle="tooltip" title="LiterateCS.Weaver.BlockListFromMarkdown(string)"><a href="../LiterateCS/Weaver.html#LiterateCS.Weaver.BlockListFromMarkdown(string)">BlockListFromMarkdown</a></span> <span class="punctuation">(</span><span class="punctuation" data-toggle="tooltip" title="string">!</span><span data-toggle="tooltip" title="LiterateCS.SplitPath">mdFile</span><span class="punctuation">)</span><span class="punctuation">,</span> <span class="punctuation" data-toggle="tooltip" title="string">!</span><span data-toggle="tooltip" title="LiterateCS.SplitPath">outputFile</span><span class="punctuation">)</span><span class="punctuation">;</span>
		<span class="punctuation">}</span>

		<span class="keyword" id="LiterateCS.MdWeaver.WeaveFromCode(LiterateCS.SplitPath)" data-toggle="tooltip" title="LiterateCS.MdWeaver.WeaveFromCode(LiterateCS.SplitPath)">private</span> <span class="keyword" data-toggle="tooltip" title="void">void</span> <span data-toggle="tooltip" title="LiterateCS.MdWeaver.WeaveFromCode(LiterateCS.SplitPath)">WeaveFromCode</span> <span class="punctuation">(</span><span class="typename" data-toggle="tooltip" title="LiterateCS.SplitPath"><a href="../LiterateCS/SplitPath.html#LiterateCS.SplitPath">SplitPath</a></span> codeFile<span class="punctuation">)</span>
		<span class="punctuation">{</span>
			<span class="typename" data-toggle="tooltip" title="LiterateCS.SplitPath"><a href="../LiterateCS/SplitPath.html#LiterateCS.SplitPath">SplitPath</a></span> outputFile <span class="punctuation">=</span> <span data-toggle="tooltip" title="LiterateCS.Weaver.CreateOutputPath(LiterateCS.SplitPath, string)"><a href="../LiterateCS/Weaver.html#LiterateCS.Weaver.CreateOutputPath(LiterateCS.SplitPath, string)">CreateOutputPath</a></span> <span class="punctuation">(</span><span data-toggle="tooltip" title="LiterateCS.SplitPath">codeFile</span><span class="punctuation">,</span> <span data-toggle="tooltip" title="LiterateCS.Options"><a href="../LiterateCS/Weaver.html#LiterateCS.Weaver._options">_options</a></span><span class="punctuation" data-toggle="tooltip" title="string">.</span><span data-toggle="tooltip" title="string"><a href="../LiterateCS/Options.html#LiterateCS.Options.MarkdownExt">MarkdownExt</a></span><span class="punctuation">)</span><span class="punctuation">;</span>
			<span data-toggle="tooltip" title="LiterateCS.MdWeaver.OutputBlocks(LiterateCS.BlockList, string)"><a href="../LiterateCS/MdWeaver.html#LiterateCS.MdWeaver.OutputBlocks(LiterateCS.BlockList, string)">OutputBlocks</a></span> <span class="punctuation">(</span><span data-toggle="tooltip" title="LiterateCS.Weaver.BlockListFromCode(string)"><a href="../LiterateCS/Weaver.html#LiterateCS.Weaver.BlockListFromCode(string)">BlockListFromCode</a></span> <span class="punctuation">(</span><span class="punctuation" data-toggle="tooltip" title="string">!</span><span data-toggle="tooltip" title="LiterateCS.SplitPath">codeFile</span><span class="punctuation">)</span><span class="punctuation">,</span> <span class="punctuation" data-toggle="tooltip" title="string">!</span><span data-toggle="tooltip" title="LiterateCS.SplitPath">outputFile</span><span class="punctuation">)</span><span class="punctuation">;</span>
		<span class="punctuation">}</span>

		<span class="keyword" id="LiterateCS.MdWeaver.WeaveFromCSharpDocument(LiterateCS.SplitPath, Microsoft.CodeAnalysis.Document)" data-toggle="tooltip" title="LiterateCS.MdWeaver.WeaveFromCSharpDocument(LiterateCS.SplitPath, Microsoft.CodeAnalysis.Document)">private</span> <span class="keyword" data-toggle="tooltip" title="void">void</span> <span data-toggle="tooltip" title="LiterateCS.MdWeaver.WeaveFromCSharpDocument(LiterateCS.SplitPath, Microsoft.CodeAnalysis.Document)">WeaveFromCSharpDocument</span> <span class="punctuation">(</span><span class="typename" data-toggle="tooltip" title="LiterateCS.SplitPath"><a href="../LiterateCS/SplitPath.html#LiterateCS.SplitPath">SplitPath</a></span> codeFile<span class="punctuation">,</span> 
			<span class="typename" data-toggle="tooltip" title="Microsoft.CodeAnalysis.Document">Document</span> document<span class="punctuation">)</span>
		<span class="punctuation">{</span>
			<span class="typename" data-toggle="tooltip" title="LiterateCS.SplitPath"><a href="../LiterateCS/SplitPath.html#LiterateCS.SplitPath">SplitPath</a></span> outputFile <span class="punctuation">=</span> <span data-toggle="tooltip" title="LiterateCS.Weaver.CreateOutputPath(LiterateCS.SplitPath, string)"><a href="../LiterateCS/Weaver.html#LiterateCS.Weaver.CreateOutputPath(LiterateCS.SplitPath, string)">CreateOutputPath</a></span> <span class="punctuation">(</span><span data-toggle="tooltip" title="LiterateCS.SplitPath">codeFile</span><span class="punctuation">,</span> <span data-toggle="tooltip" title="LiterateCS.Options"><a href="../LiterateCS/Weaver.html#LiterateCS.Weaver._options">_options</a></span><span class="punctuation" data-toggle="tooltip" title="string">.</span><span data-toggle="tooltip" title="string"><a href="../LiterateCS/Options.html#LiterateCS.Options.MarkdownExt">MarkdownExt</a></span><span class="punctuation">)</span><span class="punctuation">;</span>
			<span data-toggle="tooltip" title="LiterateCS.MdWeaver.OutputBlocks(LiterateCS.BlockList, string)"><a href="../LiterateCS/MdWeaver.html#LiterateCS.MdWeaver.OutputBlocks(LiterateCS.BlockList, string)">OutputBlocks</a></span> <span class="punctuation">(</span><span data-toggle="tooltip" title="LiterateCS.Weaver.BlockListFromDocument(Microsoft.CodeAnalysis.Document)"><a href="../LiterateCS/Weaver.html#LiterateCS.Weaver.BlockListFromDocument(Microsoft.CodeAnalysis.Document)">BlockListFromDocument</a></span> <span class="punctuation">(</span><span data-toggle="tooltip" title="Microsoft.CodeAnalysis.Document">document</span><span class="punctuation">)</span><span class="punctuation">,</span> <span class="punctuation" data-toggle="tooltip" title="string">!</span><span data-toggle="tooltip" title="LiterateCS.SplitPath">outputFile</span><span class="punctuation">)</span><span class="punctuation">;</span>
		<span class="punctuation">}</span>

		<span class="keyword" id="LiterateCS.MdWeaver.OutputBlocks(LiterateCS.BlockList, string)" data-toggle="tooltip" title="LiterateCS.MdWeaver.OutputBlocks(LiterateCS.BlockList, string)">private</span> <span class="keyword" data-toggle="tooltip" title="void">void</span> <span data-toggle="tooltip" title="LiterateCS.MdWeaver.OutputBlocks(LiterateCS.BlockList, string)">OutputBlocks</span> <span class="punctuation">(</span><span class="typename" data-toggle="tooltip" title="LiterateCS.BlockList"><a href="../LiterateCS/BlockList.html#LiterateCS.BlockList">BlockList</a></span> blocks<span class="punctuation">,</span> <span class="keyword" data-toggle="tooltip" title="string">string</span> outputFile<span class="punctuation">)</span>
		<span class="punctuation">{</span>
			<span class="keyword">using</span> <span class="punctuation">(</span><span class="keyword" data-toggle="tooltip" title="System.IO.StreamWriter">var</span> <span id="writer">writer</span> <span class="punctuation">=</span> <span class="typename" data-toggle="tooltip" title="System.IO.File">File</span><span class="punctuation" data-toggle="tooltip" title="System.IO.File.CreateText(string)">.</span><span data-toggle="tooltip" title="System.IO.File.CreateText(string)">CreateText</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="string">outputFile</span><span class="punctuation">)</span><span class="punctuation">)</span>
				<span class="keyword">foreach</span> <span class="punctuation">(</span><span class="keyword" data-toggle="tooltip" title="LiterateCS.BlockList">var</span> block <span class="keyword">in</span> <span data-toggle="tooltip" title="LiterateCS.BlockList">blocks</span><span class="punctuation">)</span>
					<span data-toggle="tooltip" title="System.IO.StreamWriter">writer</span><span class="punctuation" data-toggle="tooltip" title="System.IO.StreamWriter.Write(string)">.</span><span data-toggle="tooltip" title="System.IO.StreamWriter.Write(string)">Write</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="LiterateCS.BlockList">block</span><span class="punctuation" data-toggle="tooltip" title="string">.</span><span data-toggle="tooltip" title="string"><a href="../LiterateCS/BlockList.html#LiterateCS.BlockList.Contents">Contents</a></span><span class="punctuation">)</span><span class="punctuation">;</span>
		<span class="punctuation">}</span>
	<span class="punctuation">}</span>
<span class="punctuation">}</span>
</code></pre>

				</div>
				<ul class="pager">
	<li class="previous"><a href="../LiterateCS/Weaver.html">Previous: Document Weaver</a></li>
	<li class="next"><a href="../LiterateCS/HtmlWeaver.html">Next: HTML Weaver</a></li>
</ul>
			</div>
        </div>
    </div>
    
    <footer class="panel-footer text-center">
        <div align="center">Copyright © 2018 Tommi Johtela</div>
		<div align="right">
			<small>
				Documentation created with <a href="https://johtela.github.io/LiterateCS/">LiterateCS</a>.
			</small>
		</div>
    </footer>


    
    <script src="../bootstrap/js/jquery.min.js"></script>
    <script src="../bootstrap/js/bootstrap.min.js"></script>
    <script src="../sidebar/sidebar.js"></script>
    <script src="../syntax-highlight/syntax.js"></script>
    <script type="text/x-mathjax-config">
        MathJax.Hub.Config({
        extensions: ["jsMath2jax.js"]
        });
    </script>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML'></script>
	<script src="../mermaid/mermaid.min.js"></script>
	<script>mermaid.initialize({startOnLoad:true});</script>

</body>
</html>